package org.bet.io;

import java.util.Arrays;

import org.springframework.core.io.ByteArrayResource;

public class StringResource extends ByteArrayResource  {
	public StringResource(String text) {
		super(text.getBytes());
	}
	
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		StringResource other = (StringResource) obj;
		if (getByteArray() == null) {
			if (other.getByteArray() != null)
				return false;
		} else if (!Arrays.equals(other.getByteArray(), other.getByteArray()))
			return false;
		return true;
	}
}
